fix(chemistry): restore the return in manifest_overview - #893
Merged
Conversation
Copilot Autofix pushed three commits straight to staging against PR #892. The last of them (cbd5a5a) re-added the per-file merge block but deleted `return overview`, so manifest_overview() built the overview and returned None. That broke `oco water-chemistry manifest-status` and failed test_manifest_overview_merges_databases and test_manifest_overview_separates_corrupt_manifest. The findings those commits were answering did not hold against the code as merged in #886: the merge block was already correctly scoped inside the `for db` loop, and the non-dict manifest guard was already present. The net effect of the autofix run was to remove a working return statement. Restore it. tests/test_chemistry_drive.py (17) and tests/test_chemistry_lims.py (30) pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Coverage✅ 79.30% total — gate is 75%. Coverage for the Python files changed in this PR
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restores
return overviewinmanifest_overview()(services/chemistry_drive.py).What happened
Copilot Autofix pushed three commits directly to
stagingagainst #892:b0e27f07d0314530cli/cli.pycbd5a5aareturn overviewThe function then built the overview and returned
None, which brokeoco water-chemistry manifest-statusand failed two tests onstaging:test_manifest_overview_merges_databasestest_manifest_overview_separates_corrupt_manifestboth with
AttributeError: 'NoneType' object has no attribute 'files' / 'databases'.On the findings that prompted it
They did not hold against the code as merged in #886 (
3f217fce). At thatcommit
overview.databases.append(db)and thefor file_id, entryloop werealready at 8-space indent inside the
for dbloop — not under theexcept—and
return overviewwas present at the end. The reported "unreachable block"and "never returns" conditions did not exist until Autofix created them.
The one lasting improvement from that run is the
isinstance(manifest, dict)guard, which is kept.
Verification
tests/test_chemistry_drive.py17 passed,tests/test_chemistry_lims.py30 passed.Worth a look separately
Autofix committed to
stagingwithout a PR, authored as a human. Whatever themerits of a given suggestion, that path has no review gate — this run made a
working function stop working, and it landed on the branch the 1.3.0 promotion
is cut from.